class FactoryQualityModel {
  List<FactoryQualityOptionModel> proCates;
  List<FactoryQualityOptionModel> sellCates;
  List<FactoryQualityOptionModel> daos;
  String zujian;
  String weicha;
  String xunjian;
  FactoryQualityModel(
      {this.proCates,
      this.sellCates,
      this.daos,
      this.zujian,
      this.weicha,
      this.xunjian});
  FactoryQualityModel.fromJson(Map<String, dynamic> json) {
    if (json['proCates'] != null) {
      proCates = List<FactoryQualityOptionModel>();
      json['proCates'].forEach((v) {
        proCates.add(FactoryQualityOptionModel.fromJson(v));
      });
    }
    if (json['sells'] != null) {
      sellCates = List<FactoryQualityOptionModel>();
      json['sells'].forEach((v) {
        sellCates.add(FactoryQualityOptionModel.fromJson(v));
      });
    }
    if (json['daos'] != null) {
      daos = List<FactoryQualityOptionModel>();
      json['daos'].forEach((v) {
        daos.add(FactoryQualityOptionModel.fromJson(v));
      });
    }
    zujian = json['zujian'];
    weicha = json['weicha'];
    xunjian = json['xunjian'];
  }
}

class FactoryQualityOptionModel {
  String id;
  String name;
  bool check;
  String daoId;
  FactoryQualityOptionModel({this.id, this.name, this.check, this.daoId});
  FactoryQualityOptionModel.fromJson(Map<String, dynamic> json) {
    id = json['id'].toString();
    name = json['name'];

    if (json.containsKey('check')) {
      check = json['check'];
    } else {
      check = false;
    }
    if (json.containsKey('dao')) {
      daoId = json['dao']['id'];
    }
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['check'] = this.check;
    return data;
  }
}
